package com.tender.lc.integration.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

@Data
@RefreshScope
@ConfigurationProperties(prefix = "msg.config")
public class MsgProperties {

    // 令牌自定义标识
    // msg.config.token.header = Authorization
    private String header = "Authorization";

    // 令牌秘钥
    // msg.config.token.secret = abcdefghijklmnopqrstuvwxyz
    private String secret = "abcdefghijklmnopqrstuvwxyz";

    // 令牌有效期（默认30分钟）
    // msg.config.token.expireTime = xxxx
    private int expireTime = 30 * 60 * 1000;

    // msg.config.token.isAddressEnabled = xxxx
    private boolean isAddressEnabled = true;

    private String[] whiteUrls = new String[]{
            "/sys/msg/login",
            "/ws/msg",  // web socket 放行
//            "/ws",
            "/home",
            "/demo/list/input",
            "/favicon.ico",
            "/api/ws/server/endPoint/push",  // 业务消息推送，放行
            "/api/ws/server/count/all",      // 统计单个JVM 上用户数量，放行
            "/router"
    };


}
